# -*- coding: utf-8 -*-
import string
from typing import Any

import pymysql


def connect_db():
    return pymysql.connect(host='192.168.0.10', user='root', passwd='123456', db='bearing_web', charset='utf8mb4')


def connect_to_db(host: string, user: string, password: string, db: Any = None):
    return pymysql.connect(host=host, user=user, passwd=password, db=db, charset='utf8mb4')
